package com.hongyue.Object2;

import java.util.Objects;

public class XueSheng {
    private String xingMing;
    private String xingBie;
    private String nianLing;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        XueSheng xueSheng = (XueSheng) o;
        return Objects.equals(xingMing, xueSheng.xingMing) &&
                Objects.equals(xingBie, xueSheng.xingBie) &&
                Objects.equals(nianLing, xueSheng.nianLing);
    }

    @Override
    public int hashCode() {
        return Objects.hash(xingMing, xingBie, nianLing);
    }

    @Override
    public String toString() {
        return "XueSheng{" +
                "xingMing='" + xingMing + '\'' +
                ", xingBie='" + xingBie + '\'' +
                ", nianLing='" + nianLing + '\'' +
                '}';
    }

    public XueSheng(String xingMing, String xingBie, String nianLing) {
        this.xingMing = xingMing;
        this.xingBie = xingBie;
        this.nianLing = nianLing;
    }

    public XueSheng() {
    }

    public String getXingMing() {
        return xingMing;
    }

    public void setXingMing(String xingMing) {
        this.xingMing = xingMing;
    }

    public String getXingBie() {
        return xingBie;
    }

    public void setXingBie(String xingBie) {
        this.xingBie = xingBie;
    }

    public String getNianLing() {
        return nianLing;
    }

    public void setNianLing(String nianLing) {
        this.nianLing = nianLing;
    }
}
